hw2 up through problem 2