solve exercise 31.05