standard math algorithms: running average, linear extrapolation