refactor_chapter7