Add relationship logic