further clean up of sorter