added sensible parallelization to for_loop.cpp