threaded client handling