add conditional statement for tags