fixed interpolation function