added #to_params method to search