implemented weighted scoring

`$wSum` is weightedSum, SumOfWeights, ...? Please be careful with abbreviated variable names.