Improve the cogrep