sorting the chapter names based on id