build scc graph separately