Made cdf more general