prep work for defining the search method.