first working version of progress dialog