changed simulate progress function