simplify and parallelize