update config and template