improved encapsulation, progress dialog