fixed Market.search method to avoid keep_if method