new API for connect