implement chapters extraction