Adding K-means code to model stats.