added tag check in set_value