solution for chapter 9