initial ranking logic