Update function and documentation for ringbuffer