copied from ADSK repo