initial graph DS code, doesn't work :/