implementing buffer wrapper