sort returned offsets