updating the plot