computes strongly connected components of graph