updated graph logic w/ data packing