solve exercise 24.06