added tagging threads (the recurent version of the method didn't quite work...)