changed chapter-path function