modify for smartgrep