solve exercise 24.14