creating an "integrated" advanced_relationship implementation, converted the code to use the alternative type of relationships