Abstract tag logic to helper