Abstracting out buffer