isomorphism: added size checks