refactored RankingService