solve exercise 40.09