changed back to fix determineRelationshipType bug