solve exercise 17.9