Updated Progress Bar script to give dynamic (variable length) progress bar