Simplified code

Simplified code for faster execution
apped progress bar to display upload progress