Modified ranker to function better