Pull req: Sorting api