add parent information to node