wrote controller for book and chapter