preliminary work on p2p connections