Made the grep command a tad bit smarter