public static int d(int l1, int l2, int type) {
		switch (type) {
			case 01 : return ( match(l1, l2) + penalty01 ); 
			case 10 : return ( match(l1, l2) + penalty01 ); 
			case 11 : return ( match(l1, l2) ); 
			case 12 : return ( match(l1, l2) + penalty21 ); 
			case 21 : return ( match(l1, l2) + penalty21 );
			default : return ( match(l1, l2) + penalty22 ); // catches the 2-2 case
		}
	}