add control functionality to progress bar