problem 9 from chapter 6