added a simpler interpolation method for when xarr is th einput