add template-attributes to final element