header template and merge