big refactoring / plan via buffers