implementation of the isomorphism paper