Added a "converged" stopping condition to k-means algorithm