added addNode and deleteNode functions to be used in the graphical editor