Updated grep lines to read input