changed to Weighted Average Logic