solve exercise 24.11