wrote functionality to combine filter queries