working input and output buffers