altered node class to have parent stored as Node