connecting to client