HW5 Prob2 finished