renaming the nodes