working on automatic optimization of parallelism
cleaned
optimizing parallelism