Adds faulty implementation for the Topological Sort

This needs fixing