implement handshake prototype