public static int unsignedBytesToInt (byte[] byteArray, int selector, int howMany, int byteOrdering)
		{
		
		// byteOrdering 
		// selector should always point to lowest byte in array
		
		// local vars
		int a = 0 ;
		
		
		switch (byteOrdering) {
			
			case HI_TO_LO:	// aka BIG_ENDIAN
			
				switch (howMany) {
					
					case 1:
						return ((int) (byteArray[selector] & 0xFF)) ;
						
				
					case 2:
						a = ((int) (byteArray[selector++] & 0xFF)) << 8;
						a += ((int) (byteArray[selector] & 0xFF)) ;
						return a;
				
					case 3:
						a = ((int) (byteArray[selector++] & 0xFF)) << 16;
						a += ((int) (byteArray[selector++] & 0xFF)) << 8;
						a += ((int) (byteArray[selector] & 0xFF)) ;
						return a;
									
					default:
						return 0 ;
						
					} // end switch
					
								
			case LO_TO_HI:	// aka LOW_ENDIAN
			
				switch (howMany) {
					
					case 1:
						return ((int) (byteArray[selector] & 0xFF)) ;
						
				
					case 2:
						a = ((int) (byteArray[selector++] & 0xFF)) ;
						a += ((int) (byteArray[selector] & 0xFF)) << 8;
						return a;
				
					case 3:
						a = ((int) (byteArray[selector++] & 0xFF)) ;
						a += ((int) (byteArray[selector++] & 0xFF)) << 8;
						a += ((int) (byteArray[selector] & 0xFF)) << 16;
						return a;
									
					default:
						return 0 ;
						
					} // end switch
			default:
				return 0 ;
					
			} // end switch

		} // end method unsignedBytesToUInt;