Adding add_graph and edit graph functionality