Mod function and sidebar for popularRanking