Added draft of parallelized version.