public static String[] preprocess(String input, int maxCharsPerLine){
		String[] strArray = input.split("\\s+");
		ArrayList<String> tmp = new ArrayList<String>();
		for(int i = 0; i < strArray.length; i++){
			if(strArray[i].length() < maxCharsPerLine){
				tmp.add(strArray[i]);
			} else {
				int oversize = strArray[i].length() / maxCharsPerLine;
				int j = 0;
				for (j = 0; j < oversize; j++){
					tmp.add(strArray[i].substring(j*maxCharsPerLine,(j+1)*maxCharsPerLine));
				}
				if(j*maxCharsPerLine != strArray[i].length())
					tmp.add(strArray[i].substring(j*maxCharsPerLine,strArray[i].length()));
			}
		}
		String[] result = new String[tmp.size()];
		result = tmp.toArray(result);
		return result;
	}