add peer.js that will handle peer-to-peer protocol