Eliminate complexity of the grep method
Improve the grep method