Implements search Method.