refactoring search view