finish hw3 part1 and part2