making gnarleyGrep more optimized