working Reduce