solve exercise 22.13