added self.search for market function and rspec