protocolize the stream writer