chapter 3, exercises 6 and 9