improved code readability for search example.