#5 adding CfWeightedProduct cost function