spec'd sort, and output, sort 3 impl