better use of buffers