working on cdf sampling