speeding up graph generation - review fixes 2