add_node checks if the node already exists