added chapter selection functionality