keep calculating until centroid movement becomes very very small