adds more documentation to graph code