updates for template and events