public static void main(String[] args) {
		try{
			System.out.println("Start time ms:" +System.currentTimeMillis());
			if(args.length>=1){
				min_support = Integer.parseInt(args[0]);
				System.out.println("Using Min Support of "+min_support);
			}
			Vector<String> candidates = new Vector<String>();

			MongoClient mongoClient = new MongoClient("localhost", 27017);
	
			DB db = mongoClient.getDB("POS");
			DBCollection itemColl = db.getCollection("SMALLPOSTX");

			BasicDBList list = (BasicDBList)itemColl.distinct("LINEITEMS.EAN");
			System.out.println(list.size()+" unique EANs, determining how many occur >"+min_support+" times");
			
			for(int n=0; n<list.size(); n++){
				if(itemColl.find(new BasicDBObject("LINEITEMS.EAN", list.get(n))).count()>min_support)
					candidates.add(""+list.get(n));
			}
			
			System.out.println("Found "+candidates.size()+" candidates (EANs appear more that "+min_support+" times)");

			//this needs to be multi-threaded!
			combination(itemColl,candidates);

			System.out.println("End time ms:" +System.currentTimeMillis());
		}
		catch(Exception e){
			e.printStackTrace();
			System.exit(-1);
		}
	}