update template and add some fields