seperating graph and ID generation