solve exercise 21.10