Use Fisher's stable sorting algorithm