Added product|sum functions
Fixed declaration and tested