refactored searchPage to make sure it works correctly in desktop browsers