refactored chapter creation