multithreaded example begining