improve the efficiency of tag