adding weighting class