refactored search view