calling ranking when template created