added progress bar and faster db reformatting