parallelized version of spatial smoothing that works