new filter API using masks