fixed bug in determining whether a node is already defined
removing debug print