exercise 2.42 completed