comment and faster ds
topological sort added