Implements search Method.
Refactoring