update sort-algorithm