Added context to grep implementation