solve exercise 39.06