finished problem 1 of hw1