incorporated Tarjans algorithm for testing of tree scc - next commit will be refactor based on some of Peter's comments