adjust template structure