public byte[] attack(byte[] initialIV, byte[] cipherTxt) throws IOException {
		//Not used (try some faster brute forced algorithm)
		/*int numOfIterations = (int)(Math.log(SHMONE_ATZERET) / Math.log(2)) +5 ;
		int numOfBytesPerIteration = ((int)(cipherTxt.length / numOfIterations) /10) *10;
		int lastIterationBytes=cipherTxt.length-(numOfBytesPerIteration * numOfIterations);

		System.out.println(numOfIterations+ " - "+ numOfBytesPerIteration);
		//return;

		//int numOfBytesPerIteration = ((int)((int)Math.sqrt((double)cipherTxt.length) /10) *10);
		//int numOfIterations = cipherTxt.length/numOfBytesPerIteration;
		//int lastInterationBytes =cipherTxt.length - (numOfBytesPerIteration * numOfIterations); 
		//int removedKeysEachIteration = (SHMONE_ATZERET-5)/numOfIterations ;
		 */

		long startTime = System.currentTimeMillis();

		byte[] ansKey = new byte[8];
		int numOfBytesPerIteration = Math.min(cipherTxt.length, 30000); //try maximum 30K bytes - it would be enough
		int numOfIterations = 1;	// not used
		//int lastIterationBytes = 0; 	//not used
		//int takeKeyEachIteration = 5;	//not used

		//creating  a candidates key
		Map <byte[],Integer> candidates = permutation("abcdefgh");
		
		//System.out.println(candidates.size());
		byte[] IV = new byte[10];
		byte[] plaintext = new byte[numOfBytesPerIteration];

		int counter=0;
		for (int iterateNum=0;iterateNum<numOfIterations;iterateNum++) {

			Set<byte[]> candidatesKeys = candidates.keySet();
			for (byte[] cs : candidatesKeys) {


				int offset=iterateNum*numOfBytesPerIteration;
				if (iterateNum == 0) IV = initialIV;
				else System.arraycopy(cipherTxt,offset-10,IV,0,10);


				counter++;
				//String candidate_keyString = new String(cs);
				if (counter%1000 == 0) {
					System.out.print((counter * 100 / SHMONE_ATZERET) +"%"); 
					} 

				int truelyWords=0;

				//CBC Algorithm with random key:
				for (int numOfBlocks = 0 ; numOfBlocks < numOfBytesPerIteration/Main.BLOCK_SIZE ; numOfBlocks ++) {
					for (int i=0;i<Main.BLOCK_SIZE && (i+offset < cipherTxt.length);i++ ) {
						plaintext[numOfBlocks * Main.BLOCK_SIZE+i]=(byte)(IV[i] ^ replaceLetter(cipherTxt[i+offset],cs));
						IV[i]=cipherTxt[i+offset];
					}
					offset+=Main.BLOCK_SIZE;
				}

				//transform from byte[] to string , clean it and look for known english words:
				String text=new String(plaintext,"ISO-8859-1");
				text=cleanText(text);
				String[] words = text.split(" ");
				for (int i=0;i<words.length;i++) 
					truelyWords+=isEnglishWord(words[i]);

				candidates.put(cs,truelyWords+candidates.get(cs));

			}

			Map<byte[],Integer> shortedSortedKeys=takeShortedKeysList(candidates,1);

			candidates=shortedSortedKeys;

			for (byte[] b: candidates.keySet()) 
				ansKey=b;


		}
		long endTime   = System.currentTimeMillis();
		long totalTime = endTime - startTime;
		System.out.println("Finished. took "+totalTime/1000+"s");
		return ansKey;
	}