adding counter to keep track of tag rank