stopped using seperate thread for server