Solving problem 1, part 2.