implemented my graph, so it finally works, well sort of