adding progress bar to js based on adactio's post