Added three functions. intersect, subtract and union