implemented resetting of the ringbuffer