Sorting of digits works