put search function in main (all plugins need to be updated with this
function)