Ringbuffer implementation for evernote challenge