created custom progressdialog. fixed some bugs.