improved Sorting