Added some code to peer.