implement the euclid distance for kmeans