private LN parseInnerNode() {
		skipWhitespace();


		// expect + consume '('
		if (inputA[ptr] != '(') {
			throw new RuntimeException("parse error: parseInnerNode expects '(' at " + ptr);
		}
		ptr++;

		ArrayList<LN> subtrees = new ArrayList<LN>();

		
		// parse first node + branch length
		{
			LN nl = parseNode();
			double l1 = parseBranchLength();
			String label1 = parseBranchLabel();
			
			nl.backLen = l1;
			nl.backLabel = label1;
			subtrees.add(nl);
			
		}
    	
		nInnerNodes++;


		double support = -1;
		String nodeLabel = null;
		
        while( true ) {
	
			skipWhitespace();
			
			if (inputA[ptr] == ')') {
				// 'normal' inner node: two childs
				ptr++;
	
	        	// the stuff between the closing ')' and the ':' of the branch length (or a ',' or the terminating ';')
	        	// is interpreted as node-label. If the node label corresponds to a float value
	        	// it is interpreted as branch support (or node support as a rooted-trees-only-please biologist would say)
	            int lend = findEndOfBranch(ptr);
	        	
	        	nodeLabel = substring(ptr, lend);
	        	ptr = lend;
	            	
	            	
	        	boolean isDigit = nodeLabel.length() != 0;
	        	for( int i = 0; i < nodeLabel.length(); i++ ) {
	        		isDigit &= Character.isDigit(nodeLabel.charAt(i));
	        		
	        		if( i == 0 ) {
	        			isDigit &= (nodeLabel.charAt(i) != '0');
	        		}
	        	}
	        	
	        	if( isDigit ) {
	        		try {
	        			support = Double.parseDouble(nodeLabel);
	        		} catch( NumberFormatException e ) {
	        			printLocation();
	        			throw e;
	        		}
	        	} else {
	        		
	        		support = -1;
	        	}
	        	
	
//				LN n = LN.create();
//	            n.data.setSupport(support);
//	            n.data.setNodeLabel(nodeLabel);
//	            
//				twiddle( nl, n.next, l1, label1, nl.data.getSupport() );
//				twiddle( nr, n.next.next, l2, label2, nr.data.getSupport() );
//	
	
	        	break;
			} else if( inputA[ptr] == ',') {
				// second comma found: three child nodes == pseudo root
				ptr++;
	
				LN nx = parseNode();
	
				double l3 = parseBranchLength();
	            String label3 = parseBranchLabel();
	         //   System.out.printf( "l3: %s\n", nx.data.getTipName() );
				skipWhitespace();
	
				subtrees.add( nx );
				nx.backLen = l3;
				nx.backLabel = label3;
//				LN n = LN.create();
//	
//				twiddle( nl, n.next, l1, label1, nl.data.getSupport() );
//				twiddle( nr, n.next.next, l2, label2, nr.data.getSupport() );
//				twiddle( nx, n, l3, label3, nx.data.getSupport() );
//				
	//			System.out.printf( "root: %f %f %f\n", nl.data.getSupport(), nr.data.getSupport(), nx.data.getSupport() );
	//			System.exit(0);
				
			} else {
				printLocation();
				throw new RuntimeException("parse error: parseInnerNode expects ')'or ',' at " + ptr);
			}
        }
        
        
        LN n = createLN( subtrees.size() + 1);
        
        LN nx = n.next;
        
        
        
        for( int i = 0; i < subtrees.size(); ++i ) {
        	nx.back = subtrees.get(i);
            nx.backLen = nx.back.backLen;
            nx.backLabel = nx.back.backLabel;
            nx = nx.next;
        }
        
//        System.out.printf( "num: %d\n", subtrees.size());
        return n;

	}