fn handshake() and TODO comments