finish the mining subgraph codes