Added publishProgress method