progress bar on optimize