exercise 2.47 completed