added a progress dialog