Some bugs in areIsomorphic method. Need to refactor the method and test it as was planned.