getting buffer to behave