Trying to avoid splice when sorting.