private int[] stringToIntArray(String str) {
        final int stringLength = str.length();
        final int[] intArray = new int[stringLength];
        for (int i = 0; i < stringLength; i++) {
            intArray[i] = Integer.parseInt(str.substring(i, i + 1));
        }
        return intArray;
    }