intermediate commit. ternary smoothsort in progress