Changed to a circular buffer