graph code