Improve interpolation finction