private ArrayList <Attribute> getAttrFromTable(TableData td)
	{
		Attribute[] in=new Attribute[td.getAttrCount()*2];
		Iterator<AttInfo> iter=td.iterator();
		while(iter.hasNext())
		{
			AttInfo att=iter.next();
			String name=att.getName();
			if(name.substring(name.length()-3, name.length()).equals("out"))
			{
				name=name.substring(0,name.length()-3);
			}
			else if(name.length()>=8)
			{
				if(name.substring(name.length()-7, name.length()).equals("outLeft"))
				{
					name=name.substring(0,name.length()-7);
				}
				else if(name.substring(name.length()-8, name.length()).equals("outRight"))
				{
					name=name.substring(0,name.length()-8);
				}
			}
			
			//TODO because this index out of bound, thus, twice the size of the array,
			//need to find the true bug
			in[att.getAttSequenceNumber()]=new Attribute(att.getDataType(),name);
		}

		ArrayList <Attribute> inAtts = new ArrayList <Attribute> ();
		for(int i=0;i<in.length;i++)
		{
			if(in[i]!=null)
			inAtts.add(in[i]);
		}

		return inAtts;
	}