added progress bar and fixed edit issue