added log statements for ranking