Adding the interpolate function