Added support for parallelization