updated plot functions