started re-implementing openmp-style parallelization