added factory for entity filtering