removed unused old/classic topological sort function