Sorting of roles