updated peer.c