added sae support

added sae support
optimized upload logic