circular buffer for speed up; record prediction to speed up