solve exercise 32.18