minor change to the filter array loop