handshake implemented (not working)