update sorting.py