added plot functions