modify z_template structure