sorting for badges.