public boolean checkRomanNr(String romanNumber) {
        float[] substractOperations = new float[9];
        char currentLetter = romanNumber.charAt(0);
        if (romanNumber.length() > 1) {
            char nextLeter = romanNumber.charAt(1);

            float globalMax;

            if (getValue(currentLetter) < getValue(nextLeter)) {
                globalMax = getValue(nextLeter);
                substractOperations[getIndex(nextLeter)] = 1;
                if (!checkValidSubstraction(currentLetter, nextLeter)) {
                    return false;
                }
            } else {
                globalMax = getValue(currentLetter);
            }

            currentLetter = nextLeter;
            for (int j = 2; j < romanNumber.length(); j++) {
                nextLeter = romanNumber.charAt(j);
                float localMax;
                if (getValue(currentLetter) < getValue(nextLeter)) {
                    localMax = getValue(nextLeter);
                    if (substractOperations[getIndex(nextLeter)] == 1) {
                        statusCode = 2;
                        return false;
                    }
                    substractOperations[getIndex(nextLeter)] = 1;
                    if (!checkValidSubstraction(currentLetter, nextLeter)) {
                        return false;
                    }
                } else {
                    localMax = getValue(currentLetter);
                }

                if (localMax > globalMax) {
                    statusCode = 2;
                    return false;
                }
                currentLetter = nextLeter;
                globalMax = localMax;
            }
        }
        return true;
    }