subset the data using grep