Incrimental update to updateCPT function
rewrite of updateCPT code for deleted parents
updateCPTs is working