ringbuffer almost done