Update NodeFactory.java