Added multithreading to server