add struct to replace parallel arrays consolidate flushed & unflushed buffers