finished part 2 of the problem set.