added search and plot functions