implement a basic buffer handling