public void addToCommunity(int id, int other, Community com)
	{
		int index1 = findCommunity(id);
		int index2 = findCommunity(other);
//		System.out.println("index1: " + index1);
//		System.out.println("index2: " + index2);
		if(index1 == index2)
		{
			if(index1 == -1)
			{
				com.addToCommunity(id);
				com.addToCommunity(other);
				//System.out.println("added " + id + "to community");
			}
			else
			{
				System.out.println("you should never reach this line :( check code if you do");
				//this would logically never be called
			}
		}
		else
		{
			if(index1 != -1 && index2 != -1) 
			{
				Community com1 = communities.get(index1);
				Community com2 = communities.get(index2);
				while(!com2.isEmpty())
					com1.addToCommunity(com2.remove(0));
				System.out.println("community size: " + communities.get(index2).size());
				System.out.println("community size of com in f(x): " + com2.size());
				communities.remove(index2);
			}
			else if (index1 == -1)
			{
				communities.get(index2).addToCommunity(id);
			}
			else if	(index2 == -1)
			{
				communities.get(index1).addToCommunity(other);
			}
			else
			{
				System.out.println("you should not reach this line!!!");
			}
		}
	}