adding multithreading
threading doesnt work in server