adding first draft of working sorter