more chapter refactoring