private QueueInterface<T> checkPostfix(QueueInterface<T> postfix) throws DAIllegalArgumentException, DAIndexOutOfBoundsException, BadPostfixException
	{
		if(postfix.getSize() < 3 && (postfix.getSize()%2) == 1)//makes sure the size of infix is greater than 3 and is an odd number
		{
			throw new BadPostfixException();
		}
		
		QueueInterface<T> newPostfix = new DynamicArray<T>();
		
		if(((String)postfix.getFront()).matches(OPERATOR))//first element can't be an operator
		{
			throw new BadPostfixException();
		}
		
		newPostfix.addLast(postfix.removeFront());
		
		
		newPostfix.addLast(postfix.removeFront());
		
		while(postfix.getSize() != 0)
		{
			if(postfix.getSize() == 1)
			{
				if(((String)postfix.getFront()).matches(OPERAND)) //second element can't be an operator
				{
					throw new BadPostfixException();
				}
			}
			if(!(((String)postfix.getFront()).matches(OPERAND) || ((String)postfix.getFront()).matches(OPERATOR)))
			{
				throw new BadPostfixException();
			}
			
			newPostfix.addLast(postfix.removeFront());
		}
		
		return newPostfix;
	}