further work on re-factor of buffers