support sorted list and normal list