modify demo and add cpt generator