exercise 2.31 completed