Updating relationship logic