added attribute to keep track of parent of node