private boolean locationOfCode(String code)
    {
        boolean afterHlt = false;

        for (int i = 0; i < codeList.length; i++) {
            if (codeList[i].equalsIgnoreCase("0000")) {
                afterHlt = true;
            }

            if (afterHlt && codeList[i].equals(code)) {
                return true;
            } else if (!afterHlt && codeList[i].equals(code)) {
                return false;
            }
        }
        return true;
    }