solve exercise 30.02