Run this loop in paralell instead.
Trim large amount of indentation.