updates to relationship function