refactor sort swagger