generating graph in memory now