added optimised version of strongly_connected..