rename algo to sort