add multithreading to tcp