sort ranking by seniority if there's a tie