solve exercise 25.17