added asserts to node class