Rejigged countryRankings fn