update to circular buffer