sort roles for groups