solve exercise 24.04