Adding search in the controller