Using ring buffer based implementation