adding hasTag function