updated nodePath.replace to this.replace