added a sorting func