Modified interpolator to take data in array form instead of opening file
everytime it was called