codebase for chapter 8