run faster by not redrawing the plot at each update
avoiding division by zero