exercise 3 in chapter 2