new sort function that should fix weird district sorting issues