wrapping up part 1 of problem 3