Added add_graph method