Add same functionality for cdf