reverse arrays for interpolation