updated to template structure