added array and changed interpolation method