better negotiation of protocol versions