refactored tagging scheme