first draft of parallelization