adding simple wire protocol abstraction