Added basic tagging code