changed ProgressBar Sample so that it uses .observe()