adds renderGraph function [WiP]