refactor buffers for simplication