implemented better sort for coursepanel