refactor chapter menu