Completed graph code