type_for_extension rejig