solve exercise 22.07