implemented a buffer