working on cdf weighting