solve exercise 39.09