sort list with recursion