add option for hiding progress dialog