enhance chapter split and minor refactor