Solving problem 1, part 3.