added script to dump connected components at different thresholds