created a dynamically changing filter