make progress bar work