new version of tce_sort_6 that sucks way less