progressbar update to the last way to provide the animate function