Add graph.hpp and use it