tagging functions added, more testing to do