Create structure and add method getNodes()