add template edit method