refactor top_tags method