fix grep spec
refactoring