funtional add-parent-to-node