Changed circular buffer to new convention