initial implementation for parallelizing sweeping