add hooks at end of chapters and sections