Completed problem 3.5