Adding codes to compute histograms of eigenvalues