Factored out Common code for filterAcc and union. And create a intersect method also