half-done version of global combine sort+ segred