working on interpolate function