updating relationship functionality