take care of protocol and config