implement handshake prototype

mebbe