exercise 2.39 completed