made the filter more generic