Added a circular buffer