part2 of the homework