simplify parallel loop