adding the plot functions