use connect for client