added the whole graph structure with add and remove functionality