First implementation of clustering, not done