refactor for search web