Added topologicalSorter()