some further improvements - still not sure why Tarjan's SCC runs so slowly on large datasets