Completed HW4 part1