Added Problem 5 solution