finish problem 1 of hw2