Finish the part of removing duplicates of tag sequence