Update: using RINGBUFFER