wrote mult-threaded test code