public int takeTerm(String input,int pos)
	{
		int pos1 = pos;
		if(isFactor(input,pos)){
			pos = takeFactor(input,pos);
			int oldPos = pos;
			if(isMultiplyDivide(input,pos)){
				pos = takeMultiplyDivide(input,pos);
				if(isFactor(input,pos)){return takeFactor(input,pos);}
			}
			return oldPos;
			}
		
		return pos1; 
	}