solution to Problem 15