implementing cdf. full of questions