add functions, Topological Sort, SCC and MST