change progress dialog to progressbar
progressbar improve
tidy code