update graph.php