Reviewed code for assignment 3