hasSameStructureAs method now working