solve exercise 24.19