solve exercise 18.32