progress bar and proper resizing