implementing buffer functions