performs handshake successfully