simplified buffer handling