update templates, replace  with  array