Added functionality to progress bar