Project 3, Problem 2 solution.