Task1 rework reduce method