did problems 1 and 2, part of problem 3