To schedule the next class with each iteration, increase index by one after the scheduling code.

Make sure to type index += 1.