hw5 part 3 and part 1.b