added support for sum, product and binomial