use a more generic filtering system