create a function ProgressBar