improve code readability for search page