updated ring buffer