move proceed to peer.go to avoid deadlock