solution to Problem 14