check at least for parent being undefined, when someone decides to call the function for a node he just created