need to implement Reduce