update the nodes