private static Double evaluateToken(HashMap<String,Double> elements,
			ArrayList<String> tokens, int n)
	{
		String token = tokens.get(n);
		char c = token.charAt(0);
		
		int isNegative = 1;
		
		if(c == '-')
		{
			//minus sign indicates negative
			//to repeat less code, change isNegative if 
			//the minus sign is there.
			isNegative = -1;
			//remove the negative
			token = token.substring(1);
			//update the first character of the negative string
			c = token.charAt(0);
		}
		
		if(Character.isAlphabetic(c))
		{
			return isNegative * retrieveVariable(elements,token);
		}
		else if(Character.isDigit(c))
		{
			return isNegative * Double.parseDouble(token);
		}
		else if(c == '(')
		{
			//evaluate as a separate expression
			//remove the parens by pulling out the substring
			return isNegative * evaluateExpression(elements,token.substring(1,token.length()-1));
		}
		else if(c == '%')
		{
			//the functionIdentifier class will remove the thing
			
			return isNegative * FunctionIdentifier.evaluateFunction(elements,token);
		}
			
		return null;
	}