first draft of the ring buffer template