exercise 2.22 completed