reduce codes, fix bugs( kosaraju )