added chapter loop