solve exercise 31.03