added ring buffers