add sorter and remove useless scale function