adds multithreading to client.