Completed problem 10.6