reordering for matching course order