add function distance_hist() to show the pairwise distance distribution