Correct code for the assignment