started with reduce sum and reduce generic