changed graph struct, tests pass (except last)