update sorting algorithms