change threading model to have one thread per client