updated for nullgraph, and a few other things