Added some parallelization.