answer to chapter 3, question 7
answer to chapter 3, question 8
formatting fixes
answer to chapter 3, question 9