stage 1: handshake almost finished