solve exercise 23.10