Completed problem 4.2