new bufferRing function added