implementation of the the Dynamic Cloud method instead of using the kmeans