added addNode method