public ArrayList<Integer> top_features_overall(int num,ca_table t1,ca_table t2)
	{
		int[] t1_totals=new int[t1.columns()];
		int[] t2_totals=new int[t1.columns()];
		int[] t1_totals_copy=new int[t1.columns()];
		int[] t2_totals_copy=new int[t1.columns()];

		for(int i=0;i<t1.columns();i++)
		{
			t1_totals[i]=t1.column_total(i);
			t1_totals_copy[i]=t1.column_total(i)*-1;
		}

		for(int i=0;i<t2.columns();i++)
		{
			t2_totals[i]=t2.column_total(i);
			t2_totals_copy[i]=t2.column_total(i)*-1;
		}

		Arrays.sort(t1_totals_copy);

		Arrays.sort(t2_totals_copy);

		HashMap<Integer,Integer> t1_map=new HashMap<Integer,Integer>();

		HashMap<Integer,Integer> t2_map=new HashMap<Integer,Integer>();

		for(int i=0;i<num;i++)
		{
			t1_map.put(t1_totals_copy[i]*-1, 1);
			t2_map.put(t2_totals_copy[i]*-1, 1);
		}

		ArrayList<Integer> t1_list=new ArrayList<Integer>();
		ArrayList<Integer> t2_list=new ArrayList<Integer>();

		int c=0;
		for(int i=0;i<t1_totals.length&&c<num;i++)
		{
			if(t1_map.containsKey(t1_totals[i]))
			{
				t1_list.add(i);
				c++;
			}
		}
		c=0;

		for(int i=0;i<t2_totals.length&&c<num;i++)
		{
			if(t2_map.containsKey(t2_totals[i]))
			{
				t2_list.add(i);
				c++;
			}
		}

		return intersection(t1_list,t2_list);
	}