implemented search command