Fix previous patch.
Added the grep function.