move stats data to globals module, for sharing values. 2, find bug in implementing union and intersect, the actuall complexcity is O(M^2K), not O(MK), I need to reimplement it using hashing, because hashing has constant checking complexity, this is to be done the next step