added parent pointer to node