copied p2p for further maintenance