add template for cpp