replaceNode() Method