better progress bar counting