code refactoring for #7 - make grep silent with -q