User can now create his own update function to process the graph