Adding search to controller