Heterogeneity and clustering of defaults