added hgrep function