fix search
Search refactoring