add progress bar, bug fixed