refine subgraph isomorphism code.