part2 for hw3