removed unused chapterId variable