init commit topo ordering working
added some input validity checks