testing multithreaded application. first attempt