solve exercise 24.20