please define one global function for renaming purpose. There are similar issues when adding new nodes, so they can be combined