solve exercise 49.17