spiked out a buffer and it works. need to implement it in buffer.cc