exercise 2.51 below