to make client thread