added interpolation function.