(edit) re writes how the main controller gets the data from the search bar