HW5 problem 2