changed interpolate to use ns and ne; seems to work for 1d