add part2 of hw3