Can anyone help me sort this mess? Couldn't compile the code and satisfy the last condition...