HW2 Part 2 Working properly