add chapter logic modification