before adding the plot