change sorting algorithm