rewrite filter_grep using new filter plugin API