final changes with test script for grepping