sorter for sorting algorithms