refactoring ranking page