added ringbuffer_reset routine