improve to connect peer.