created generic functions for cpt functions