Multithreading with complicated method