HW2_part2 complete