sample tag logic