added a progress bar for dist matrix