started implementing a buffer