only works for sorter