Added more code to the ringbuffer