integrated new graph datastructure into rest of the code