Ringbuffer improved