added support for iterative kmeans