refactoring SortOrder