added basic tagging. needs cleanup.