solve exercise 24.10