add graph.cpp adn graph.h