added k-means initialisation