updating peer.cpp