started directed graph code