added functions sum and product