final private void createAndAddNumber(String number) throws InvalidInputException
	{
		//see if we were given a valid number
		try
		{
			if (!number.trim().equals(""))
			{
				if (this.OUTPUT_MODE == Calculate.OUTPUT_EXACT_MODE)
				{
					Fraction newNumber = new Fraction(new BigDecimal(number.trim()), Fraction.ONE_DENOMINATOR);
					addTokenToTokenizedExpression(newNumber);
				} else
				{
					Number newNumber = new Number(number);
					addTokenToTokenizedExpression(newNumber);
				}
			}
		} catch (NumberFormatException invalidNumber)
		{
			//if the number was invalid, see if there's a variable somewhere in there
			int startOfNumber = 0;
			int endOfNumber = 0;
			int startOfVariable = 0;
			int endOfVariable = 0;
			boolean readingInNumber = true;
			for (int expressionIndex = 0; expressionIndex < number.length(); expressionIndex++)
			{
				if (isDigit(number.substring(expressionIndex, expressionIndex + 1)))
				{
					if (!readingInNumber)
					{
						readingInNumber = true;
						endOfVariable = expressionIndex;
						createAndAddVariable(number.substring(startOfVariable, endOfVariable).trim());
					}
					startOfVariable = expressionIndex + 1;
				} else
				{
					if (readingInNumber)
					{
						readingInNumber = false;
						endOfNumber = expressionIndex;
						createAndAddNumber(number.substring(startOfNumber, endOfNumber).trim());
					}
					startOfNumber = expressionIndex + 1;
				}
			}
			if (readingInNumber)
			{
				createAndAddNumber(number.substring(startOfNumber, number.length()).trim());
			} else
			{
				createAndAddVariable(number.substring(startOfVariable, number.length()).trim());
			}
		}
	}