code is working fine on ubuntu, progress bar still not bug free