Completed problem 5.3