topN feature fully working