solve exercise 39.14