final public static void main( String[] args ) {
		
		//determine the cards that the user is required to use in his/her
		//163 expression
		ArrayList < Integer > cardsRequiredToBeUsed = new ArrayList < Integer > ();
		for ( int i = 0 ; i <= 5 ; i ++ ) {
			cardsRequiredToBeUsed.add( Integer.valueOf( args[ i ] ) );
		}
		
		//determine the expression inputed by the user
		String expression = args[ 6 ];
		
		//determine all the cards the user used
		String[] cards = expression.split("[+\\-*/()]");
		for ( int i = 0 ; i < cards.length ; i ++ ) {

			try {
				
				//convert card value to an integer value
				Integer cardValue = Integer.valueOf( cards[ i ] );
				
				//the user has used this card, so remove it from the list of cards
				//required to be used
				cardsRequiredToBeUsed.remove( cardValue );
			} catch ( NumberFormatException e ) {
				
				//ignore no numerical things
			}
		}
		
		//if the user has not used all the cards, then the user's expression is wrong
		if ( cardsRequiredToBeUsed.size() > 0 ) {
			System.err.println( "Did not use all 6 cards" );
			System.exit( 1 );
		}
		
		String expectedOutput = "163";
		Calculate c = new Calculate();
		c.setExactOutput();
		
		//check that the user's expression evaluates to 163
		try {
			String evaluateOutput = c.evaluate( expression );
			if ( evaluateOutput.equals( expectedOutput ) ) {
				System.exit( 0 );
			} else {
				System.err.println( "Expression does not evaluate to 163" );
				System.exit( 1 );
			}
		} catch ( Exception e ) {
			System.err.println( "Invalid mathematical expression" );
			System.exit( 1 );
		}
	}