new version of sorter