replace the streams with buffers to uhomogenize api