implement union and difference operations