updated template for cpp