Sorted list debugged