Changed client to multithreaded