changed parallel execution to include grouping logic