added progress dialog for loading