add parent relationship to rows and spans