graph keeps track of id