implement search_grep