change api to set relationships