solve exercise 19.17