more changes for spatially varying E field