small mod to the parallel routine