public ArrayList<ArrayList<String>> subset(TreeNode root, int attr, int value, String type) {
		ArrayList<ArrayList<String>> subset = new ArrayList<ArrayList<String>>();
		
		for(int i = 0; i < root.getRecords().size(); i++) {
			ArrayList<String> record = root.getRecords().get(i);
			if(type.equalsIgnoreCase("equalto")){
				if(Integer.parseInt(record.get(attr)) == value)
					subset.add(record);
			}
			else{
				if(Integer.parseInt(record.get(attr)) != value)
					subset.add(record);
			}
		}
		return subset;
	}