refining tagging functionality