designing the connection protocol