Added Problem 2 solution