adding two complex row index filters using custom functions