refactor and adjust filters to handle array of arrays, since they are now separated in groups