add update graph funciton(not complete) to GraphController