implement handshake prototype

I think this should be removed?