implementation of progress bar