solve exercise 30.01