moved ccd functions into function folder