using kmeans to make sub-models