debuged parallelization