Updated filtering to act as before by substituting in each record.