added separate UI thread and progressbar