speeding up graph generation - review fixes 3