- track previous time index and to avoid recalculating averages. - make sure averages are up-to-date before calling write