[#65434852] refactor code into Ranking class