solution to Problem 48