reduce_sort