implement handshake prototype

wat