created searchList method

made the search algorithm its own search method.