Finished HW4 part2