client thread functions skeleton