implement chapter 9