code cleaning of peerProcess