Add parent to nodes