parallelizing the first theta loop