choose the most connected node first