refactor-client only for connection