working version, progressbar etc