removed dependence on globals for search results