hacked up copy
more flexible graphing structure