unfinished changes to cpp templates