now tag functionality working as expected