new chapters + refactoring