solve exercise 24.13