add new sorter and merger, rework the ranges