Added cdf() and mkd() functions