renamed interpolate function