multithreading example. not completed.