finished HW2 part1