controller updated-Search function

incomplete at the moment