updated plot method