better use of require for graphdocs