In 1999, S. Basagni has presented the DMAC algorithm (Distributed Mobility-Adaptive Clutering) that partitions the nodes of a mobile ad hoc network into clusters, thus giving the network a hierarchical organization. This algorithm supports the mobility of the nodes, even during the cluster formation. Its main feature is that it considers weighted networks to choose the clusterheads, in contrary to the other heuristics which take into account parameters, like the degree or the identifier, which have no physical relation with the network topology. The problem of that protocol is that it assumes that the weights are unique (i.e. distincts for each node). We propose an original solution to this issue and we present a complete performance study measuring the improvement.