fix and test tagging feature