Added following ranking code.
Merge conflict fixed.