Sorting id secured