sorting the chapter names so they appear in an order