For hw6 problem 2 part 2.