private long fromVals(final int wordNumber, final int[] vals) {
		
		if(wordNumber * 32 > vals.length) {
			System.out.println("Wordnumber is too large for vals\t" + wordNumber + 
					"\t" + vals.length);
			return -1;
		}
		
		int last = (wordNumber + 1) * 32;
		if(last > vals.length) {
			last = vals.length;
		}
		
		StringBuilder bytes = new StringBuilder();
		for(int i = last -1; i >= wordNumber * 32; i--) {
			switch(vals[i] % 4) {
			case 0:
				bytes.append("00");
				break;
			case 1:
				bytes.append("01");
				break;
			case 2:
				bytes.append("10");
				break;
			case 3:
				bytes.append("11");
				break;
			}
		}
		
		return new BigInteger(bytes.toString(), 2).longValue();
	}