Adds general relationship function