inital attempt to code out some of the CPT functions