add basic buffer manipulation