finished exchange functions in Handshake class