solve exercise 30.23