Put CCD code in function