re-wrote threading code and methods as recomended by msdn c# forum