added progress bar logic
fixed merge conflicts