fixed tagging
added logging