add Intersect and improve the union function