add extrapolation function