update method that generate the graph. Make difference between output parameters