add ringbuffer based on fixed size array