Added multithreading to the server