added implementation for protocolToBuffer module