added weighting