added database, graph now working