Implements tagging functionality