added search function
modified search controller and views
added final_query for testing