adopted parallel reduction