solve exercise 30.16