added more tests, corrected on bug in the directedgrpah class.