Re-implemented search command. Passed all test.